function dispNames() {

    game_name = $.cookie('game_name')
    game_price = $.cookie('game_price')

    $("h6#gname").html(game_name)
    $("span#gprice").html(game_price)
    $("strong#gprice").html(game_price)

    $("input#username").val($.cookie('user_name'))
}

function submitOdr(stat) {
    event.preventDefault()
    user_id = $.cookie('user_id')
    game_id = $.cookie('game_id')

    $.get(
        "http://localhost:8080/submitOrder",
        {
            "userId": user_id,
            "gameId": game_id,
            "orderStat": stat
        },
        function (result) {
            $.removeCookie('game_id')
            $.removeCookie('game_name')
            $.removeCookie('game_price')
            if (result.code == 0) {
                alert("已经买过了")
                window.location.replace("index.html")
            } else {
                alert("购买成功")
                window.location.replace("index.html")
            }
        }
    )
}